package com.guoxin.adapter.objectdapter;

/**
 * 适配器类
 * 
 * @author Administrator
 *
 */
public class VoltageAdapter implements IVoltage5V {
	
	private Voltage220V voltage220V;

	public VoltageAdapter(Voltage220V voltage220v) {
		super();
		voltage220V = voltage220v;
	}

	@Override
	public int output5V() {
		//获取到 220V 电压
		int srcV = voltage220V.output220V();
		//转成 5v
		return srcV / 44 ; 
	}

}
